<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>南京某高校法学院教务系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="登陆">
	<link rel="stylesheet" type="text/css" href="css/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="css/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="css/demo/demo.css">
    <script type="text/javascript" src="js/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="js/easyui/jquery.easyui.min.js"></script>
  </head>
  
  <body>
	 <h2>Basic Form</h2>
    <p>Fill the form and submit it.</p>
    <div style="margin:20px 0;"></div>
    <div class="easyui-panel" title="法学院后台管理系统" style="width:400px" data-options="top:'400'">
        <div style="padding:10px 60px 20px 60px">
        <form id="ff" method="post" action="commonLogin.action">
		    
		        <div style="margin-bottom:10px">
		            <input class="easyui-textbox" name="userName" style="width:100%;height:40px;padding:12px" data-options="required:true,prompt:'用户名',iconCls:'icon-man',iconWidth:38">
		        </div>
		        <div style="margin-bottom:20px">
		            <input class="easyui-textbox" name="passWord" type="password" style="width:100%;height:40px;padding:12px" data-options="required:true,prompt:'Password',iconCls:'icon-lock',iconWidth:38">
		        </div>
		        <div style="margin-bottom:20px">
		            <input type="checkbox" checked="checked" name="remindMe">
		            <span>记住我</span>
		        </div>
		        <div>
		            <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;" onclick="submitForm()">
		                <span style="font-size:14px;">登陆</span>
		            </a>
		        </div>
        </form>
        </div>
    </div>
    <script>
        function submitForm(){
        	$.messager.progress();	// display the progress bar
        	$('#ff').form('submit', {
        		url: 'commonLogin.action',
        		onSubmit: function(){
        			var isValid = $(this).form('validate');
        			if (!isValid){
        				$.messager.progress('close');	// hide progress bar while the form is invalid
        			}
        			return isValid;	// return false will stop the form submission
        		},
        		success: function(){
        			$.messager.progress('close');	// hide progress bar while submit successfully
        		}
        	});
        }
    </script>
  </body>
</html>
